package com.java.blog.webmagic.pipeline;

import com.alibaba.fastjson.JSONArray;
import com.java.blog.utils.RedisUtil;

import us.codecraft.webmagic.ResultItems;
import us.codecraft.webmagic.Task;
import us.codecraft.webmagic.pipeline.Pipeline;

public class RedisPipeline implements Pipeline {

	@Override
	public void process(ResultItems resultItems, Task task) {
		JSONArray qiushi = resultItems.get("qiushi");
		RedisUtil.set("qiushi", qiushi.toJSONString());
	}

}
